<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8"/>
		<title>Emulatrix - Play Retro Games Online</title>
		<meta property="og:title" content="Emulatrix"/>
		<meta property="og:url" content="https://www.emulatrix.net"/>
		<meta property="og:description" content="Play Retro Games Online"/>
		<meta property="og:image" content="https://www.emulatrix.net/EmulatrixShare.png"/>
		<meta property="og:type" content="website"/>
		<meta property="og:site_name" content="Emulatrix"/>
		<meta name="theme-color" content="#000000"/>
		<meta name="mobile-web-app-capable" content="yes"/>
		<meta name="apple-mobile-web-app-capable" content="yes"/>
		<meta name="description" content="JavaScript Emulator. Sega Genesis, Nintendo, Super Nintendo, GameBoy, GameBoy Color, GameBoy Advance, MAME32, DOSBox and Virtual Machines."/>
		<meta name="keywords" content="emulator, abandonware, games, sega, genesis, nintendo, super, gameboy, color, advance, mame, mame32, arcade, dos, dosbox, javascript, emscripten, online, free, open, source"/>
		<link rel="icon" sizes="16x16" type="image/png" href="EmulatrixFavIcon_16x16.png"/>
		<link rel="icon" sizes="192x192" type="image/png" href="EmulatrixFavIcon_192x192.png"/>
		<link rel="apple-touch-icon" href=""/>
		<link rel="apple-touch-startup-image" href=""/>
		<script type="application/ld+json">
			{
			"@context": "https://schema.org",
			"@type": "Organization",
			"url": "https://www.emulatrix.net",
			"logo": "https://www.emulatrix.net/EmulatrixFavIcon_512x512.png"
			}
		</script>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
		<style>
			html,body{background-color:black;height:100%;padding:0;margin:0;overflow:hidden}
			#content{position:fixed;height:100%;width:100%;margin:0;padding:0;border:none;display:none}

			@media only screen and (orientation:portrait)
				{
				#content{position:fixed;transform:rotate(-90deg);transform-origin:left top;width:100vh;overflow-x:hidden;top:100%;left:0}
				}
		</style>
	</head>
	<body>
		<iframe id="content" src="about:blank"></iframe>
		<script>

			function resizeContent()
				{
				var w = window.innerWidth;
				var h = window.innerHeight;

				if(window.innerHeight > window.innerWidth) // MOBILE DEVICE
					{
					document.getElementById("content").style.width = h + "px";
					document.getElementById("content").style.height = w + "px";
					}
					else
					{
					document.getElementById("content").style.width = w + "px";
					document.getElementById("content").style.height = h + "px";
					}
				}

			window.addEventListener("load", function()
				{
				// RESIZING THE IFRAME
				resizeContent();

				// TO KEEP FOCUS IN THE IFRAME
				setInterval(function()
					{
					document.getElementById("content").focus();
					}, 250);

				// LOADING THE GAME
				document.getElementById("content").src = "Emulatrix.htm";

				// SHOWING THE IFRAME
				document.getElementById("content").style.display = "block";
				});

			window.addEventListener("resize", function()
				{
				// RESIZING THE IFRAME WHEN THE SCREEN SIZE CHANGES
				resizeContent();
				});

			var supportsOrientationChange = "onorientationchange" in window, orientationEvent = supportsOrientationChange ? "orientationchange" : "resize";
			window.addEventListener(orientationEvent, function()
				{
				// RESIZING THE IFRAME WHEN THE SCREEN ORIENTATION CHANGES
				resizeContent();
				}, false);

			function updateTitle()
				{
				document.title = "Emulatrix";
				}
		</script>
	</body>
</html>